<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>系统访问量统计例子</title>
</head>
<body>

<!-- 通过application对象来记录访问量 -->
<%
	// 先获取application当中的hitCount的值
	Integer count = (Integer)application.getAttribute("hitCount");
	if(count == null || count == 0){
		count = 1;
	}else{
		count +=1 ;
	}
	// 每次点击1次，都更新访问量
	application.setAttribute("hitCount", count);
%>
页面访问量:<%= count %>


</body>
</html>